﻿using FluentValidation;
using RockBus.DataContracts;

namespace RockBus.ConfigurationService.Validation
{
    public class AddOrUpdatePublishersRequestValidator : AbstractValidator<AddOrUpdatePublishersRequest>
    {
        public AddOrUpdatePublishersRequestValidator()
        {
            this.RuleFor(x => x.Publishers).NotNull();
            this.RuleFor(x => x.Publishers).NotEmpty();
            this.RuleFor(x => x.Publishers).SetCollectionValidator(new PublisherInfoValidator());
        }
    }
}